/*
 * COLOR PICKER TOOL
 */

.ui-color-picker {
  width: 420px;
  margin: 0;
  border: 1px solid #ddd;
  background-color: #fff;
  display: table;
  user-select: none;
}

.ui-color-picker .picking-area {
  width: 198px;
  height: 198px;
  margin: 5px;
  border: 1px solid #ddd;
  position: relative;
  float: left;
  display: table;
}

.ui-color-picker .picking-area:hover {
  cursor: default;
}

/* HSV format - Hue-Saturation-Value(Brightness) */
.ui-color-picker .picking-area {
  background: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0) 100%),
    linear-gradient(to right, #fff 0%, rgb(255 255 255 / 0) 100%);
  background-color: #f00;
}

/* HSL format - Hue-Saturation-Lightness */
.ui-color-picker[data-mode="HSL"] .picking-area {
  background: linear-gradient(
      to bottom,
      hsl(0 0% 100%) 0%,
      hsl(0 0% 100% / 0) 50%,
      hsl(0 0% 0% / 0) 50%,
      hsl(0 0% 0%) 100%
    ),
    linear-gradient(to right, hsl(0 0% 50%) 0%, hsl(0 0% 50% / 0) 100%);
  background-color: #f00;
}

.ui-color-picker .picker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #fff;
  position: absolute;
  top: 45%;
  left: 45%;
}

.ui-color-picker .picker:before {
  width: 8px;
  height: 8px;
  content: "";
  position: absolute;
  border: 1px solid #999;
  border-radius: 50%;
}

.ui-color-picker .hue,
.ui-color-picker .alpha {
  width: 198px;
  height: 28px;
  margin: 5px;
  border: 1px solid #fff;
  float: left;
}

.ui-color-picker .hue {
  background: linear-gradient(
    to right,
    #f00,
    #ff0,
    #0f0,
    #0ff,
    #00f,
    #f0f,
    #f00
  );
}

.ui-color-picker .alpha {
  border: 1px solid #ccc;
  background: url("alpha.png");

  background-image: conic-gradient(
    transparent 90deg,
    rgb(0 0 0 / 0.1) 90deg 180deg,
    transparent 180deg 270deg,
    rgb(0 0 0 / 0.1) 270deg
  );
  background-size: 10px 10px;
}

.ui-color-picker .alpha-mask {
  width: 100%;
  height: 100%;
  background: url("alpha_mask.png");
}

.ui-color-picker .slider-picker {
  width: 2px;
  height: 100%;
  border: 1px solid #777;
  background-color: #fff;
  position: relative;
  top: -1px;
}

/* input HSV and RGB */

.ui-color-picker .info {
  width: 200px;
  margin: 5px;
  float: left;
}

.ui-color-picker .info * {
  float: left;
}

.ui-color-picker .input {
  width: 64px;
  margin: 5px 2px;
  float: left;
}

.ui-color-picker .input .name {
  height: 20px;
  width: 30px;
  text-align: center;
  font-size: 14px;
  line-height: 18px;
  float: left;
}

.ui-color-picker .input input {
  width: 30px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid #ddd;
  text-align: center;
  float: right;
  user-select: text;
}

.ui-color-picker .input[data-topic="lightness"] {
  display: none;
}

.ui-color-picker[data-mode="HSL"] .input[data-topic="value"] {
  display: none;
}

.ui-color-picker[data-mode="HSL"] .input[data-topic="lightness"] {
  display: block;
}

.ui-color-picker .input[data-topic="alpha"] {
  margin-top: 10px;
  width: 93px;
}

.ui-color-picker .input[data-topic="alpha"] > .name {
  width: 60px;
}

.ui-color-picker .input[data-topic="alpha"] > input {
  float: right;
}

.ui-color-picker .input[data-topic="hexa"] {
  width: auto;
  float: right;
  margin: 6px 8px 0 0;
}

.ui-color-picker .input[data-topic="hexa"] > .name {
  display: none;
}

.ui-color-picker .input[data-topic="hexa"] > input {
  width: 90px;
  height: 24px;
  padding: 2px 0;
  box-sizing: border-box;
}

/* Preview color */
.ui-color-picker .preview {
  width: 95px;
  height: 53px;
  margin: 5px;
  margin-top: 10px;
  border: 1px solid #ddd;
  background-image: url("alpha.png");
  float: left;
  position: relative;
}

.ui-color-picker .preview:before {
  height: 100%;
  width: 50%;
  left: 50%;
  top: 0;
  content: "";
  background: #fff;
  position: absolute;
  z-index: 1;
}

.ui-color-picker .preview-color {
  width: 100%;
  height: 100%;
  background-color: rgb(255 0 0 / 0.5);
  position: absolute;
  z-index: 1;
}

.ui-color-picker .switch_mode {
  width: 10px;
  height: 20px;
  position: relative;
  border-radius: 5px 0 0 5px;
  border: 1px solid #ddd;
  background-color: #eee;
  left: -12px;
  top: -1px;
  z-index: 1;
  transition: all 0.5s;
}

.ui-color-picker .switch_mode:hover {
  background-color: #ccc;
  cursor: pointer;
}

/*
 * UI Component
 */

.ui-input-slider {
  height: 20px;
  user-select: none;
}

.ui-input-slider * {
  float: left;
  height: 100%;
  line-height: 100%;
}

/* Input Slider */

.ui-input-slider > input {
  margin: 0;
  padding: 0;
  width: 50px;
  text-align: center;
  box-sizing: border-box;
}

.ui-input-slider-info {
  width: 90px;
  padding: 0px 10px 0px 0px;
  text-align: right;
  text-transform: lowercase;
}

.ui-input-slider-left,
.ui-input-slider-right {
  width: 16px;
  cursor: pointer;
  background: url("arrows.png") center left no-repeat;
}

.ui-input-slider-right {
  background: url("arrows.png") center right no-repeat;
}

.ui-input-slider-name {
  width: 90px;
  padding: 0 10px 0 0;
  text-align: right;
  text-transform: lowercase;
}

.ui-input-slider-btn-set {
  width: 25px;
  background-color: #2c9fc9;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  line-height: 14px;
  text-align: center;
}

.ui-input-slider-btn-set:hover {
  background-color: #379b4a;
  cursor: pointer;
}

/*
 * COLOR PICKER TOOL
 */

body {
  max-width: 1000px;
  margin: 0 auto;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  box-shadow: 0 0 5px 0 #999;
  box-sizing: border-box;
  user-select: none;
}

/**
 * Resize Handle
 */
.resize-handle {
  width: 10px;
  height: 10px;
  background: url("resize.png") center center no-repeat;
  position: absolute;
  bottom: 0;
  right: 0;
}

[data-resize="both"]:hover {
  cursor: nw-resize !important;
}

[data-resize="width"]:hover {
  cursor: w-resize !important;
}

[data-resize="height"]:hover {
  cursor: n-resize !important;
}

[data-hidden="true"] {
  display: none;
}

[data-collapsed="true"] {
  height: 0 !important;
}

.block {
  display: table;
}

/**
 * 	Container
 */
#container {
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr;
}

/**
 * 	Picker Zone
 */

#picker {
  padding: 10px;
  width: 980px;
}

.ui-color-picker {
  padding: 3px 5px;
  float: left;
  border-color: #fff;
}

.ui-color-picker .switch_mode {
  display: none;
}

.ui-color-picker .preview-color:hover {
  cursor: move;
}

/**
 * Picker Container
 */

#picker-samples {
  width: 375px;
  height: 114px;
  max-height: 218px;
  margin: 0 10px 0 30px;
  overflow: hidden;
  position: relative;
  float: left;

  transition: all 0.2s;
}

#picker-samples .sample {
  width: 40px;
  height: 40px;
  margin: 5px;
  border: 1px solid #ddd;
  position: absolute;
  float: left;
  transition: all 0.2s;
}

#picker-samples .sample:hover {
  cursor: pointer;
  border-color: #bbb;
  transform: scale(1.15);
  border-radius: 3px;
}

#picker-samples .sample[data-active="true"] {
  border-color: #999;
}

#picker-samples .sample[data-active="true"]:after {
  content: "";
  position: absolute;
  background: url("arrow.png") center no-repeat;
  width: 100%;
  height: 12px;
  top: -12px;
  z-index: 2;
}

#picker-samples #add-icon {
  width: 100%;
  height: 100%;
  position: relative;
  box-shadow: inset 0px 0px 2px 0px #ddd;
}

#picker-samples #add-icon:hover {
  cursor: pointer;
  border-color: #ddd;
  box-shadow: inset 0px 0px 5px 0px #ccc;
}

#picker-samples #add-icon:before,
#picker-samples #add-icon:after {
  content: "";
  position: absolute;
  background-color: #eee;
  box-shadow: 0 0 1px 0 #eee;
}

#picker-samples #add-icon:before {
  width: 70%;
  height: 16%;
  top: 42%;
  left: 15%;
}

#picker-samples #add-icon:after {
  width: 16%;
  height: 70%;
  top: 15%;
  left: 42%;
}

#picker-samples #add-icon:hover:before,
#picker-samples #add-icon:hover:after {
  background-color: #ddd;
  box-shadow: 0 0 1px 0 #ddd;
}

/**
 * 	Controls
 */

#controls {
  width: 110px;
  padding: 10px;
  float: right;
}

#controls #picker-switch {
  text-align: center;
  float: left;
}

#controls .icon {
  width: 48px;
  height: 48px;
  margin: 10px 0;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid #ddd;
  display: table;
  float: left;
}

#controls .icon:hover {
  cursor: pointer;
}

#controls .picker-icon {
  background-image: url("picker.png");
}

#controls #void-sample {
  margin-right: 10px;
  background-image: url("void.png");
  background-position: center left;
}

#controls #void-sample[data-active="true"] {
  border-color: #ccc;
  background-position: center right;
}

#controls .switch {
  width: 106px;
  padding: 1px;
  border: 1px solid #ccc;
  font-size: 14px;
  text-align: center;
  line-height: 24px;
  overflow: hidden;
  float: left;
}

#controls .switch:hover {
  cursor: pointer;
}

#controls .switch > * {
  width: 50%;
  padding: 2px 0;
  background-color: #eee;
  float: left;
}

#controls .switch [data-active="true"] {
  color: #fff;
  background-image: url("grain.png");
  background-color: #777;
}

/**
 * 	Trash Can
 */

#delete {
  width: 100%;
  height: 94px;
  background-color: #ddd;
  background-image: url("grain.png");
  background-repeat: repeat;

  text-align: center;
  color: #777;

  position: relative;
  float: right;
}

#delete #trash-can {
  width: 80%;
  height: 80%;
  border: 2px dashed #fff;
  border-radius: 5px;
  background: url("trash-can.png") no-repeat center;

  position: absolute;
  top: 10%;
  left: 10%;
  box-sizing: border-box;

  transition: all 0.2s;
}

#delete[drag-state="enter"] {
  background-color: #999;
}

/**
 * 	Color Theme
 */

#color-theme {
  margin: 0 8px 0 0;
  border: 1px solid #eee;
  display: inline-block;
  float: right;
}

#color-theme .box {
  width: 80px;
  height: 92px;
  float: left;
}

/**
 * Color info box
 */
#color-info {
  width: 360px;
  float: left;
}

#color-info .title {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  text-align: center;
  background-image: url("color-wheel.png");
  background-repeat: no-repeat;
  background-position: center left 30%;
}

#color-info .copy-container {
  position: absolute;
  top: -100%;
}

#color-info .property {
  min-width: 280px;
  height: 30px;
  margin: 10px 0;
  text-align: center;
  line-height: 30px;
}

#color-info .property > * {
  float: left;
}

#color-info .property .type {
  width: 60px;
  height: 100%;
  padding: 0 16px 0 0;
  text-align: right;
}

#color-info .property .value {
  width: 200px;
  height: 100%;
  padding: 0 10px;
  font-size: 16px;
  color: #777;
  text-align: center;
  background-color: #fff;
  border: none;
}

#color-info .property .value:hover {
  color: #37994a;
}

#color-info .property .value:hover + .copy {
  background-position: center right;
}

#color-info .property .copy {
  width: 24px;
  height: 100%;
  padding: 0 5px;
  background-color: #fff;
  background-image: url("copy.png");
  background-repeat: no-repeat;
  background-position: center left;
  border-left: 1px solid #eee;
  text-align: right;
  float: left;
}

#color-info .property .copy:hover {
  background-position: center right;
}

/**
 * 	Color Palette
 */

#palette {
  display: grid;
  grid-template-columns: auto auto;
  background-color: #eee;
  color: #777;
}

#color-palette {
}

#color-palette .container {
  width: 100%;
  height: 50px;
  line-height: 50px;
  overflow: hidden;
  float: left;
  transition: all 0.5s;
}

#color-palette .container > * {
  float: left;
}

#color-palette .title {
  width: 100px;
  padding: 0 10px;
  text-align: right;
  line-height: inherit;
}

#color-palette .palette {
  width: 456px;
  height: 38px;
  margin: 3px;
  padding: 3px;
  display: table;
  background-color: #fff;
}

#color-palette .palette .sample {
  width: 30px;
  height: 30px;
  margin: 3px;
  position: relative;
  border: 1px solid #ddd;
  float: left;
  transition: all 0.2s;
}

#color-palette .palette .sample:hover {
  cursor: pointer;
  border-color: #bbb;
  transform: scale(1.15);
  border-radius: 3px;
}

#color-palette .controls {
}

#color-palette .controls > * {
  float: left;
}

#color-palette .controls > *:hover {
  cursor: pointer;
}

#color-palette .controls .lock {
  width: 24px;
  height: 24px;
  margin: 10px;
  padding: 3px;
  background-image: url("lock.png");
  background-repeat: no-repeat;
  background-position: bottom right;
}

#color-palette .controls .lock:hover {
  /*background-image: url('images/unlocked-hover.png');*/
  background-position: bottom left;
}

#color-palette .controls .lock[locked-state="true"] {
  /*background-image: url('images/locked.png');*/
  background-position: top left;
}

#color-palette .controls .lock[locked-state="true"]:hover {
  /*background-image: url('images/lock-hover.png');*/
  background-position: top right;
}

/**
 * Canvas
 */

#canvas {
  width: 100%;
  height: 300px;
  min-height: 250px;
  border-top: 1px solid #ddd;
  background-image: url("grain.png");
  background-repeat: repeat;
  position: relative;
  float: left;
}

#canvas[data-tutorial="drop"] {
  text-align: center;
  font-size: 30px;
  color: #777;
}

#canvas[data-tutorial="drop"]:before {
  content: "Drop colors here to compare";
  width: 40%;
  padding: 30px 9% 70px 11%;

  background-image: url("drop.png");
  background-repeat: no-repeat;
  background-position: left 35px top 60%;

  text-align: right;

  border: 3px dashed rgb(221 221 221);
  border-radius: 15px;

  position: absolute;
  top: 50px;
  left: 20%;
}

#canvas[data-tutorial="drop"]:after {
  content: "adjust, change or modify";
  width: 40%;
  font-size: 24px;
  position: absolute;
  top: 130px;
  left: 32%;
  z-index: 2;
}

#canvas [data-tutorial="dblclick"] {
  background-color: #999 !important;
}

#canvas [data-tutorial="dblclick"]:before {
  content: "double click to activate";
  width: 80px;
  color: #fff;
  position: absolute;
  top: 10%;
  left: 20%;
  z-index: 2;
}

#canvas .sample {
  width: 100px;
  height: 100px;
  min-width: 20px;
  min-height: 20px;
  position: absolute;
  border: 1px solid rgb(255 255 255 / 0.3);
}

#canvas .sample:hover {
  cursor: move;
}

#canvas .sample[data-active="true"]:after {
  content: "";
  position: absolute;
  background: url("arrow.png") center no-repeat;
  width: 100%;
  height: 12px;
  top: -12px;
  z-index: 2;
}

#canvas .sample:hover > * {
  cursor: pointer;
  display: block !important;
}

#canvas .sample .resize-handle {
  display: none;
}

#canvas .sample .pick {
  width: 10px;
  height: 10px;
  margin: 5px;
  background: url("pick.png") center no-repeat;
  position: absolute;
  top: 0;
  left: 0;
  display: none;
}

#canvas .sample .delete {
  width: 10px;
  height: 10px;
  margin: 5px;
  background: url("close.png") center no-repeat;
  position: absolute;
  top: 0;
  right: 0;
  display: none;
}

/**
 * Canvas controls
 */

#canvas .toggle-bg {
  width: 16px;
  height: 16px;
  margin: 5px;
  background: url("images/canvas-controls.png") center left no-repeat;
  position: absolute;
  top: 0;
  right: 0;
}

#canvas .toggle-bg:hover {
  cursor: pointer;
}

#canvas[data-bg="true"] {
  background: none;
}

#canvas[data-bg="true"] .toggle-bg {
  background: url("canvas-controls.png") center right no-repeat;
}

#zindex {
  height: 20px;
  margin: 5px;
  font-size: 16px;
  position: absolute;
  opacity: 0;
  top: -10000px;
  left: 0;
  color: #777;
  float: left;
  transition: opacity 1s;
}

#zindex input {
  border: 1px solid #ddd;
  font-size: 16px;
  color: #777;
}

#zindex .ui-input-slider-info {
  width: 60px;
}

#zindex[data-active="true"] {
  top: 0;
  opacity: 1;
}
